The _g_r_o_u_p_s command shows the groups to which you or the optionally
specified user belong. Each user belongs to a group specified in the
password file ////eeeettttcccc////ppppaaaasssssssswwwwdddd and possibly to other groups as specified in
the file ////eeeettttcccc////ggggrrrroooouuuupppp. Invoking _g_r_o_u_p_s without a _u_s_e_r specified executes a
_g_e_t_g_r_o_u_p_s system call, which returns the grouplist of which the process
is currently a member. This list will contain only the effective group
ID unless a _m_u_l_t_g_r_p_s call has been executed; in that case it will contain
all groups in ////eeeettttcccc////ggggrrrroooouuuupppp to which the user belongs. If you do not own a
file but belong to the group which owns it then you are granted group
access to the file.
When creating a new file, if the underlying filesystem was mounted with
the BSD file creation semantics flag [see _f_s_t_a_b(4)] or the SSSS____IIIISSSSGGGGIIIIDDDD bit is
set [see _c_h_m_o_d(2)] on the parent directory, then the group ID of the new
file is set to the group ID of the parent directory, otherwise it is set
to the effective group ID of the calling process.
The maximum number of groups of which a process may be a member is
defined (as an lbootable option) in ////vvvvaaaarrrr////ssssyyyyssssggggeeeennnn////mmmmaaaasssstttteeeerrrr....dddd////kkkkeeeerrrrnnnneeeellll, named